package com.bcxj.apipassenger.remote;

import com.bcxj.internalcommon.dto.TravelUserDTO;
import com.bcxj.internalcommon.dto.VerificationCodeDTO;
import com.bcxj.internalcommon.entity.TravelUser;
import com.bcxj.internalcommon.response.ResponseResult;
import com.bcxj.internalcommon.vo.TravelUserVO;
import com.xiaoleilu.hutool.util.BeanUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * ClassName: ServiceUserClient
 * Package: com.bcxj.apipassenger.remote
 * Description:
 *
 * @Author BCXJ
 * @Create 2025/2/12 23:07
 * @Version 1.0
 * @Since 1.0
 */
@FeignClient("service-user")
public interface ServiceUserClient {
    @PostMapping("/user")
    ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @PostMapping("/user/update")
    public ResponseResult updateUser(@RequestBody TravelUserDTO user);

    @GetMapping("/user/get")
    ResponseResult<TravelUserVO> getUser(@RequestParam String userPhone);
}
